import fetch from '@/common/utils/http'

/* 获取语音 */
export const getVoice = (data: any) =>
  fetch({
    url: '/call/web/call/action/ivr/voice-library/query',
    method: 'GET',
    params: data
  })

/* 删除语音 */
export const delVoice = (id: string) =>
  fetch({
    url: `/call/web/call/action/ivr/voice-library/${id}`,
    method: 'DELETE',
    data: {}
  })

/* 新建保存语音 */
export const addVoice = (data: any) =>
  fetch({
    url: '/call/web/call/action/ivr/voice-library',
    method: 'POST',
    data
  })

/* 更新语音库 */
export const updateVoice = (data: any) =>
  fetch({
    url: '/call/web/call/action/ivr/voice-library',
    method: 'PUT',
    data
  })
